package forumTransform.forumTransformID;
import java.io.File;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Attributes;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.nodes.Node;
import org.jsoup.select.Elements;
import org.w3c.dom.NodeList;


/**
 * 
 */

/**
 * @author dan
 *
 */
public class ReadHTML {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
			 
		String topicId = null;
		String forumId = null;
		List<String> topicFiles = Utils.getTopicFiles();
		Forum f = new Forum("Walden");
		for (Iterator it = topicFiles.iterator(); it.hasNext();) {
			String string = (String) it.next();
			Topic t = new Topic("in/"+string);
			t.readTopic();
			t.processUtterances(f);
			t.exportUCINET();
		}
    	ResultFileWriter outWriter		= new ResultFileWriter("participation", f.exportCSV(), ".csv");
    	outWriter.persist();
		
		System.out.println("Done");
		
	}

}